Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented Nov 3, 2025

Refactors the transformSpyCallInspection function in the Jasmine to Vitest schematic to improve readability and reduce nesting.

The previous implementation used a deeply nested if condition to handle various spy call inspection patterns. This change inverts the primary if condition into a guard clause, allowing the function to exit early if the node does not match the expected type. This flattens the overall structure of the function, making the main logic more prominent and easier to follow.

…ogic

Refactors the `transformSpyCallInspection` function in the Jasmine to Vitest schematic to improve readability and reduce nesting.

The previous implementation used a deeply nested `if` condition to handle various spy call inspection patterns. This change inverts the primary `if` condition into a guard clause, allowing the function to exit early if the node does not match the expected type. This flattens the overall structure of the function, making the main logic more prominent and easier to follow.
@clydin clydin added the target: rc This PR is targeted for the next release-candidate label Nov 3, 2025
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Nov 3, 2025
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 4, 2025
@alan-agius4 alan-agius4 merged commit 7e724d7 into angular:main Nov 4, 2025
35 checks passed
@alan-agius4
Copy link
Collaborator

This PR was merged into the repository. The changes were merged into the following branches:

@clydin clydin deleted the refactor/minor-cleanup-jasmine-vitest branch November 4, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @schematics/angular target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants